From ebaab45e146d7f64a4ef2624e1a8e9ff04b75652 Mon Sep 17 00:00:00 2001 From: "rread@ubuntu.eng.hq.xensource.com" Date: Wed, 8 Feb 2006 19:20:51 -0700 Subject: [PATCH] Fix the backward compatibility support for using 'vcpus' in the image section of the domain sexp. Signed-off-by: Robert Read --- tools/python/xen/xend/XendDomainInfo.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 7c572dedbb..5db26c1d4b 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -294,7 +294,9 @@ def parseConfig(config): try: if result['image']: v = sxp.child_value(result['image'], 'vcpus') - if v is not None and int(v) != result['vcpus']: + if result['vcpus'] is None and v is not None: + result['vcpus'] = int(v) + elif v is not None and int(v) != result['vcpus']: log.warn(('Image VCPUs setting overrides vcpus=%d elsewhere.' ' Using %s VCPUs for VM %s.') % (result['vcpus'], v, result['uuid'])) -- 2.30.2